home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Applications / Graphics / Gnuplot / Source / SubObject.m < prev    next >
Encoding:
Text File  |  1993-03-18  |  938 b   |  71 lines

  1.  
  2. static char RCSId[]="$Id: SubObject.m,v 1.1.1.1 1993/03/18 03:36:12 davis Exp $";
  3.  
  4.  
  5. #import <objc/hashtable.h>    /* NXCopyStringBufferFromZone()    */
  6. #import <objc/zone.h>
  7.  
  8. #import "SubObject.h"
  9.  
  10. @implementation SubObject
  11.  
  12. - init
  13. {
  14.     [super init];
  15.     stringValue = NULL;
  16.     return self;
  17. }
  18.  
  19.  
  20. - initFromString:(const char *)aString
  21. {
  22.     [super init];
  23.  
  24.     [self setStringValue:aString];
  25.     return self;
  26. }
  27.  
  28.  
  29. - free
  30. {
  31.     NXZoneFree ([self zone], stringValue);
  32.     return [super free];
  33. }
  34.  
  35.  
  36. - setStringValue:(const char *)aString
  37. {
  38.     NXZone *zone = [self zone];
  39.  
  40.     NXZoneFree (zone, stringValue);
  41.  
  42.     if (aString && *aString)
  43.     stringValue = NXCopyStringBufferFromZone (aString, zone);
  44.     else
  45.     stringValue = NULL;
  46.  
  47.     return self;
  48. }
  49.  
  50.  
  51. - (const char *)stringValue
  52. {
  53.     return stringValue;
  54. }
  55.  
  56.  
  57. - (BOOL)isAttachment
  58. {
  59.     return NO;
  60. }
  61.  
  62.  
  63. // Shuts up the compiler about unused RCSId
  64. - (const char *) rcsid
  65. {
  66.     return RCSId;
  67. }
  68.  
  69.  
  70. @end
  71.